/**
 * @(#)Catalogo.java
 *
 *
 * @author Mauro Celani
 * @version 1.00 2013/9/15
 */


public class Catalogo extends Container{
	
    private static Catalogo c = new Catalogo();
	
    public Catalogo(){
    	super();
    }
    
    public static Catalogo getCatalogo(){
    	return c;
    }
    
    public boolean saveInDB(){
    	//EVENTUALE SALVATAGGIO SUL DB
    	return true;
    }
    
    public boolean loadFromDB(){
    	//EVENTUALE CARICAMENTO DAL DB
    	//SIMULIAMOLO:
    	for(int i = 0; i < ((int)(Math.random()*5+5)); i++)
    		this.insert(new Prodotto("Prod"+i));
    	return true;
    }
    
    public String toString(){
    	return "\nCATALOGO:\n" + super.toString();
    }
    
}